<!--<body>-->
	<script type="text/javascript" src="<?php echo base_url('skin/js/retrieve.js'); ?>"></script>
    <div id="orderSummary">
         <div class="width960c">
            
            <div class="alignCenter" id="statusSummary">
			    <div class="globelogo" style="margin:15px 0px 0px -835px">
                	<img src="<?php echo base_url('skin/images/globe.png'); ?>" width="128" height="55" alt="Globe">
                </div>
                <h1 class="header36 marg10 textBold">Your GoGADGETS prepaid bundle details</h1>
                <?php /*?><h1 class="header36 marg10 textBold">Order Summary</h1>
				<p class="text16 marg10Top">Please review your order before clicking the Confirm button to proceed.</p><?php */ ?>
                <div class="width500">
                <p class="text20 marg0 textBold">Status: <span style="color: <?php echo $data->statusColor; ?>"><?php echo $data->statusDescription; ?></span></p>
                <p class="text16 marg10Top"><?php echo $data->statusText; ?></p>

                <hr>                
                <p><b>Amount of savings received to date:</b> P<?php echo number_format($data->seededRebate,2); ?></p>
                <p><b>Total savings for the chosen commitment period:</b> P<?php echo number_format($data->totalRebate,2); ?></p>
                <hr>

                </div>             
                
            </div>
            
            <?php /* ?>
            <div class="planCode" style="display:none">
                <div class="floatLeft box1">
                    <img class="marg20Top" src="images/goGadgetsMini.png" width="94" height="105" alt=""/>
                </div>
                
                <div class="floatLeft box2">
                    <h1 class="marg0 header24">Congratulations, <span id="nameReturned"></span>!</h1><h1 class="marg0 header24">You&#39;ve successfully registered to a GoGADGETS prepaid device bundle.</h1>
                    <h2 class="header30 marg10Top textBold underLine">Your reference number is <span id="planCodemismo"></span></span></h2>
                    <p class="text14 marg0">Your plan code has been sent to your Globe Prepaid mobile number and email. Please make sure that you have your plan code and registration summary ready when you go to your chosen Globe Store for handset pickup. You&#39;ll receive a notification within 48 hours indicating your handset pickup details.</p>
                </div>
                <span class="clear"></span>
            </div>
            <?php */ ?>
            
            <?php //$gadgetName = $data->gadgetBrand . " " . $data->gadgetName; ?>
            <?php $gadgetName = $data->gadgetName; ?>
            
            <div class="phoneSum">
            	<div class="floatLeft imgHolder alignCenter">
                		<img src="<?php echo $data->imgURL; ?>" width="128" height="128" alt="<?php echo $gadgetName; ?>" />
                </div>            
                <div class="floatLeft information">
                        <p class="font24yv fontBold marg0">Reference Number: <?php echo $data->planCode; ?></p>
                
                        <p class="text20 marg0"><?php echo $gadgetName; ?></p>
                        
                        <ul>
                        <li><?php echo $data->promoName; ?>
                           <p> With <?php echo $data->promoDesc; ?>.</p>
                           <p> Valid for <?php echo $data->validityDesc;?>.</p>
							<?php if ($data->validityDesc == "7 days"): ?>
								 <p>Must subscribe weekly throughout the registration period</p>
							<?php elseif ($data->validityDesc == "15 days"): ?>
								 <p>Must subscribe twice a month throughout the registration period</p>
							<?php else: ?>
								 <p>Must subscribe once a month throughout the registration period</p>
							<?php endif;?>
                        </li>
                        <li>Registration period and cash back
                            <p><?php echo $data->commitmentPeriod; ?> months</p>
                            <p>Total cash back of P<?php echo number_format($data->totalRebate,2); ?>&nbsp;(P<?php echo number_format(str_replace("P", "", $data->rebateAmt),2); ?> per registration to <?php echo $data->promoName; ?>)</p>
						</li>
                        </ul>
                
                </div>
                
                <div class="floatRight priceList">
                        <div class="darkGrayBg">
                        <p>Upon pick up of your gadget, total cash out required is:</p>
                        </div>
                        <table>
                            <tr>
                                <td><?php echo $gadgetName; ?> </td>             
                                <td class="alignRight">P<?php echo number_format($data->gadgetPrice,2); ?></td>
                            </tr>
                            <tr>
                                <td><?php echo $data->promoName; ?></td>
                                <td class="alignRight"><?php echo number_format($data->promoPrice,2); ?></td>
                           
                            </tr>
                             <tr class="fontBold text20">
                            <td>Total Cash Out  </td><td  class="alignRight"><?php echo  "P" . number_format(str_replace(",", "", $data->gadgetPrice) + str_replace(",", "", $data->promoPrice) ,2); ?></td>
                            </tr> 
                        </table>
                        <div class="darkGrayBg">
								<?php $totrebate = number_format($data->totalRebate,2); ?>
								<?php if (strchr(number_format(str_replace(",", "", $data->gadgetPrice) - str_replace(",", "", $totrebate),2),"-",false)): ?>
									 <p>With your cash back, the gadget price is now:</p>
								<?php else: ?>
									 <p>With your cash back, the discounted gadget price is:</p>
								<?php endif;?>
                        </div>
                        <table>
                            <tr>
                                <td><?php echo $gadgetName; ?> </td>             
                                <td class="alignRight">P<?php echo number_format($data->gadgetPrice,2); ?></td>
                            </tr>
                            <tr>
                                <td>Total cash back</td>
                                <td class="alignRight"><?php echo number_format($data->totalRebate,2); ?></td>
                           
                            </tr>
                            <tr class="fontBold text20">
								<?php $totrebate = number_format($data->totalRebate,2); ?>
								<?php if (strchr(number_format(str_replace(",", "", $data->gadgetPrice) - str_replace(",", "", $totrebate),2),"-",false)): ?>
									 <td>Discounted Gadget Price<br/>(After Cash Back)</td>
								<?php else: ?>
									 <td>Discounted Gadget Price</td>
								<?php endif;?>							
							<td class="alignRight">
							<?php
							  $totrebate = number_format($data->totalRebate,2);  
							  if (strchr(number_format(str_replace(",", "", $data->gadgetPrice) - str_replace(",", "", $totrebate),2),"-",false))
								  echo  "<span style='text-decoration:line-through'>P" . number_format(str_replace(",", "", $data->gadgetPrice) - str_replace(",", "", $totrebate),2) . "</span><br/>FREE";
							  else
							      echo  "P" . number_format(str_replace(",", "", $data->gadgetPrice) - str_replace(",", "", $totrebate),2);
							?></td>
                            </tr>
                        </table>
                        
                        
                        
                </div>
                 <span class="clear"></span>
            
            </div>
            
            
            <div class="phoneSum2 text14">
                <div class="phoneSum2A floatLeft">
                    <div><p class="textBold inBlock  width215">Mobile number </p> <p class="inBlock"><?php $msisdn = $data->msisdn; echo $msisdn=="" ? "None" : "0".$msisdn; ?></p></div>
						<?php
							$mName = $data->mName;
							$mNameArray = array();
							$mName = explode(' ', $mName);
							
							foreach($mName as $value){
							$value = substr($value,0,1);
							array_push($mNameArray,$value);
							}
							
							$mi=implode("", $mNameArray);	 
					   ?> 
                    <div><p class="textBold inBlock width215">Name</p>                 <p class="inBlock"><?php echo $data->fName . " " . $mi . ". " . $data->lName; ?> </p></div>
                    <div><p class="textBold inBlock width215">Nickname</p>             <p class="inBlock"><?php echo $data->nName; ?></p></div>
                    <div><p class="textBold inBlock width215">Email address</p>            <p class="inBlock"><?php echo $data->email; ?></p></div>
                    <div><p class="textBold inBlock width215">Other contact number</p>   <p class="inBlock"><?php echo $data->otherCont; ?></p></div>
                    <div><p class="textBold inBlock width215">Date of birth</p>            <p class="inBlock"><?php echo $data->birthdate; ?></p></div>
                    <div><p class="textBold inBlock width215">Home address</p>
						<p class="inBlock">
						<?php //echo $data->streetNum . ", " . $data->area . ", " . $data->town . ", " . $data->province . " " . $data->postalCode; ?>
						<?php echo $data->streetNum;
							if (!empty($data->area)) echo ", " . $data->area;
							if (!empty($data->town)) echo ", " . $data->town;
							if (!empty($data->province)) echo ", " . $data->province ;
							echo " " . $data->postalCode; ?>
						</p></div>
                    <div><p class="textBold inBlock width215">Globe Store branch</p>     <p class="inBlock"><?php echo $data->storeName; ?></p></div>
                </div>
                
                
                <span class="clear"></span>
                
                <div class="alignCenter" style="display:none" id="btn_print">
                    <a href="#." class="buttonBlue text14 marg10Top">Print</a>
                </div>
                
                <p class="text14" id="footnote"><span class="textBold">Note:</span> The device selected is subject to availability. You&#39;ll receive a notification should there be any changes in your registration.</p>
            </div>
            
         </div>   
                
      
    </div>